<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
<link rel="stylesheet" href="./include/reg.css">
</head>

	<script>
		function check_reg(){
			if(reg_form.u.value.length == 0){
				alert('注册账号必填！');
				return reg_form.u.focus();

			}else if(reg_form.p.value.length == 0){
				alert('注册密码必填！');
				return reg_form.p.focus();

			}else if(reg_form.rp.value.length == 0){
				alert('确认密码必填！');
				return reg_form.rp.focus();

			}else{
				reg_form.submit();
			}
		}
	</script>

<body>
	
		<div class="container">
		<div class="content">
			<h3>注册用户</h3>
			<form method="post" name="reg_form" class="reg_form" action="check_reg.php">
				<input type="text" name="u" class="u" placeholder="请输入账号" required title="账号必填！">
				<input type="password" name="p"  class="p" placeholder="请输入密码" required title="密码必填！">
				<input type="password" name="rp"  class="rp" placeholder="请确认密码" required title="密码必填！">
				<input type="button" id="btn" value="确定" onclick="check_reg()">
			</form>
			<div class="linkbar"><a href="login.php">返回登录</a><a href="index.php">返回主页</a></div>
		</div>
	</div>

</body>
</html>